home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / windows 95 utilities / programming tools / freeman installer / ctl3dldr.h_ / ctl3dldr
Text File  |  1995-09-17  |  655b  |  35 lines

  1. #define __CTL3DLDR_H
  2.  
  3. /* we can not load ctl3dv2.dll twice. So we save the handle for multiple use */
  4.  
  5. class ctl3dloader
  6. {
  7.    int isfree;                       /* should we call free() when destructed? */
  8.  
  9.    static int count;                                              /* ref count */
  10.  
  11.    static HINSTANCE h;                                /* handle to ctl3d32.dll */
  12.  
  13.    public:
  14.  
  15.    ctl3dloader()
  16.    {
  17.       isfree = 0;
  18.    }
  19.    ctl3dloader(int *r)
  20.    {
  21.       *r = init();
  22.    }
  23.   ~ctl3dloader()
  24.    {
  25.       if (isfree)
  26.       {
  27.          free();
  28.       }
  29.    }
  30.    int init();
  31.    void free();
  32.    void takectl(HWND wnd);
  33. };
  34.  
  35.